package com.heima.user.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.user.service.ApUserRealnameService;
import com.heima.user.service.ApUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
@RequiredArgsConstructor
public class ApUserRealnameController {


    private final ApUserRealnameService apUserRealnameService;

    /**
     * 用户未认证列表
     * @param authDto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult listApUserUnAuthenticated(@RequestBody AuthDto authDto) {
         return apUserRealnameService.listApUserUnAuthenticated(authDto);
    }

    /**
     * 审核失败
     * @param authDto
     * @return
     */
    @PostMapping("/authFail")
    public ResponseResult ApUserRealnameAuthFail(@RequestBody AuthDto authDto) {
        return apUserRealnameService.ApUserRealnameAuthFail(authDto);
    }


    /**
     * 审核通过
     * @param authDto
     * @return
     */
    @PostMapping("/authPass")
    public ResponseResult ApUserRealnameAuthPass(@RequestBody AuthDto authDto) {
        return apUserRealnameService.ApUserRealnameAuthPass(authDto);
    }
}
